/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package hhf.worldzones.entities;

import hhf.flex.annotations.entities.FlexChildren;
import java.util.Collection;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

/**
 *
 * @author HHFrancois
 */
@Entity
public class Region extends Zone {

	private static final long serialVersionUID = 1L;
	@ManyToOne
	private Country country;
	@OneToMany(fetch = FetchType.EAGER, mappedBy = "region")
	@FlexChildren
	private Collection<City> cities;

	/**
	 * @return the country
	 */
	public Country getCountry() {
		return country;
	}

	/**
	 * @param country the country to set
	 */
	public void setCountry(Country country) {
		this.country = country;
	}

	/**
	 * @return the cities
	 */
	public Collection<City> getCities() {
		return cities;
	}

	/**
	 * @param cities the cities to set
	 */
	public void setCities(Collection<City> cities) {
		this.cities = cities;
	}

}
